/*
使用双重循环实现五子棋游戏棋盘的绘制
*/

public class FifthQuestion
{
    public static void main(String[] args) {
        // 定义17位数组
        String[] arrs = {" ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"};
        
        // 行17，列17，两个for循环
        for (int i=0; i<17; i++) {
            for (int j=0; j<17; j++) {
                // 第一行按照j的数值输出数组元素
                if (i==0) {
                    System.out.print(arrs[j]+" ");
                // 第一列按照从第二行开始按照i的数值输出数组
                } else if (i>0 && j==0) {
                    System.out.print(arrs[i]+" ");
                // 其余行和列都输出星号
                } else {
                    System.out.print("* ");
                }
            }
            System.out.println();
        }
    }
}